package com.shujia.day17;

import java.util.function.Predicate;

public class Code10LambdaFunction {
    public static void main(String[] args) {


        /*
        @FunctionalInterface
        public interface Predicate<T> {
            boolean test(T t);
        }

         */
        Predicate<String> predicate1 = (s) -> {
           return s.equals("lambda");
        };

        Predicate<String> predicate2 = s -> s.equals("lambda");

        System.out.println(predicate2.test("lambda"));
        System.out.println(predicate1.test("lambda"));


    }
}
